---
layout: single
property_name: transition-duration
---

<section id="transition-duration" class="property">
  <header class="property-header">
    <nav class="property-links">
        <a class="property-collection" href="{{site.url}}/transitions/">
          In collection: <strong>transitions</strong>
        </a>
      <a class="property-links-direct" href="{{site.url}}/property/transition-duration/" data-property-name="transition-duration" data-tooltip="Single page for this property">Permalink</a>
      <a class="property-share" data-tooltip="Share on Twitter or Facebook" data-property-name="transition-duration">Share</a>
        <a target="_blank" href="http://caniuse.com/#feat=css-transitions" data-tooltip="See on Can I use..." rel="external">Can I use</a>
      <a target="_blank" href="https://developer.mozilla.org/en/docs/Web/CSS/transition-duration" data-tooltip="See on Mozilla Developer Network" rel="external">MDN</a>
    </nav>
    <h2 class="property-name">
      <a href="#transition-duration"><span>#</span>transition-duration</a>
    </h2>
    <div class="property-description">
      <p>Defines how long the transition lasts.</p>

    </div>

  </header>

    <style type="text/css">.transition-duration { padding: 0; }</style>

    <style type="text/css">.transition-duration:hover .square { background: hsl(348, 100%, 61%);color: #fff;transform: translateX(200%); }</style>

    <style type="text/css">.transition-duration .square { transition-timing-function: linear;transition-property: background transform; }</style>


    <section class="example">
      <header class="example-header">
        <p class="example-name">
            <code class="example-default" data-tooltip="This is the property's default value">default</code>


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="transition-duration: 0s;">transition-duration: 0s;</code>
        </p>
        <div class="example-description">
          <p>The transition will last <strong>zero seconds</strong>, and is thus <strong>instant</strong>.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div transition-duration " id="transition-duration-0s"><p class="square square--alpha">Hover me</p></div>
        </div>
      </aside>
        <style type="text/css">#transition-duration-0s .square { transition-duration: 0s; }</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="transition-duration: 1.2s;">transition-duration: 1.2s;</code>
        </p>
        <div class="example-description">
          <p>You can use <strong>decimal</strong> values in <strong>seconds</strong> with the keyword <code>s</code>.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div transition-duration " id="transition-duration-12s"><p class="square square--alpha">Hover me</p></div>
        </div>
      </aside>
        <style type="text/css">#transition-duration-12s .square { transition-duration: 1.2s; }</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="transition-duration: 2400ms;">transition-duration: 2400ms;</code>
        </p>
        <div class="example-description">
          <p>You can use <strong>milliseconds</strong> instead of seconds, with the keyword <code>ms</code>.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div transition-duration " id="transition-duration-2400ms"><p class="square square--alpha">Hover me</p></div>
        </div>
      </aside>
        <style type="text/css">#transition-duration-2400ms .square { transition-duration: 2400ms; }</style>
    </section>

</section>
